local ticket = tonumber(redis.call('GET', 'ticket'))
if ticket - ARGV[1] >= 0 then
    ticket = ticket - ARGV[1]
    redis.call('SET', 'ticket', ticket)
    return ticket
end
return -9999